@extends('layouts.admin')
@section('content')
    <style>
        span{font-size: 13px;color: #000000}
        th{font-size: 15px;color: #000000}
        .JHGAList th{
            font-size: 14px !important;
        }
    </style>
    <script type="text/javascript" src="/js/admin/report.js"></script>
    <div id="cc" class="easyui-layout" style="width:1800px;height:800px;margin: 0 auto;">
        <div data-options="region:'west',title:'数据查询',split:true" style="width:300px;">
            <div class="easyui-accordion" style="height:300px;">

            <div id='p' title="地区" data-options="iconCls:''" style="padding:10px;width: 100%;">
                <ul class="easyui-tree" id="easyui-tree">
                    <li data-options="level:2">
                        <span><a style="color: #000000" href="reportlist">{{$tree['name']}}</a></span>
                        <ul>@foreach($tree['street'] as $k=>$v) 
                            <li data-options="level:3,area_id:'{{$v['id']}}'" state="closed">
                                <span> <a style="color: #000000" href="reportlistcontent?level=4&city={{$v['id']}}" target="myFrameName">{{$v['name']}}</a></span>
                                    <ul>
                                        <li>
                                        </li>
                                    </ul>
                            </li>
                            @endforeach
                        </ul>
                    </li>
                </ul>
            </div>
            </div>
        </div>
        <div data-options="region:'center',title:'详细信息页'" style="width:1000px;padding:5px">
			<div class="goback"><a href="/admin/map">返 回</a></div>
            <table class="JHGAList" style="width: 100%; font-size: 12px; margin-top: 32px;">
            @if($company->enterprise != 3)
                <tbody><tr>
                    <th align="right" style="width: 15%">分类:</th>
                    <td class="tdbgcolor" style="width: 35%" colspan="3">
                        <span id="EnteType">{{$categoryname}}</span>
                    </td>
                </tr>
                <tr>
                    <th align="right" style="width: 15%">单位名称:</th>
                    <td class="tdbgcolor" style="width: 35%">
                        <span id="dwmc">{{$company->comName}}</span>
                    </td>
                    <th align="right" style="width: 15%">统一社会信用代码:</th>
                    <td class="tdbgcolor" style="width: 35%">
                        <span id="dwgszch"></span>
                    </td>

                </tr>
                <tr>
                    <th align="right" style="width: 15%">法定代表人:</th>
                    <td class="tdbgcolor" style="width: 35%">
                        <span id="fddbr">{{$company->leader}}</span>
                    </td>
                    <th align="right" style="width: 15%">联系电话:</th>
                    <td class="tdbgcolor" style="width: 35%">
                        <span id="fddbrgddh">{{$company->leaderPhone}}</span>
                    </td>
                </tr>
                <tr>
                    <th align="right" style="width: 15%">主要负责人:</th>
                    <td class="tdbgcolor" style="width: 35%">
                        <span id="frdbzw">{{$company->leader}}</span>
                    </td>
                    <th align="right" style="width: 15%">职工人数:</th>
                    <td class="tdbgcolor" style="width: 35%">
                        <span id="StaffCount">{{$company->workersNum}}</span>
                    </td>
                </tr>
                <tr>
                    <th align="right" style="width: 15%">单位地址:</th>
                    <td colspan="4" class="tdbgcolor">
                        <span id="dwdz">{{$address}}</span>
                    </td>
                </tr>
                <tr>
                    <th align="right" style="width: 15%">所属网格:</th>
                    <td colspan="4" class="tdbgcolor">
                        <span id="xzqh">{{$shequ}}</span>
                    </td>
                </tr>
                <tr>
                    <th align="right" style="width: 15%">检查单位:</th>
                    <td class="tdbgcolor" style="width: 35%">
                        <span id="tbr">北宅街道</span>
                    </td>
                    <th align="right" style="width: 15%">检查人:</th>
                    <td class="tdbgcolor" style="width: 35%">
                        <span id="tbsj">{{$comcheck[0]->name}}</span>
                    </td>

                </tr>
                <tr>
                    <th align="right" style="width: 15%">检查时间:</th>
                    <td class="tdbgcolor" style="width: 35%">
                        <span id="tbsj">{{$comcheck[0]->created}}</span>
                    </td>
                    <th align="right" style="width: 15%">是否存在隐患:</th>
                    <td class="tdbgcolor" style="width: 35%">
                        <span id="dwdz">{!! $is?'否':'是' !!}</span>
                    </td>
                </tr>
                <tr>
                    <th align="right" style="width: 15%">检查情况:</th>
                    <td colspan="4" class="tdbgcolor">
            <span id="dwdz">{!! $is?'待整改':'' !!}
                @if(!empty($negatives))
                    @foreach($negatives as $ne)
                        {{$ne['content'].';'}}
                    @endforeach
                @endif
            </span>
                    </td>
                </tr>
                <tr>
                    <th align="right" style="width: 15%">整改状态:</th>
                    <td colspan="4" class="tdbgcolor">
                        <span id="dwdz">{!! $again?'正常':'待整改' !!}</span>
                    </td>
                </tr>
                <tr>
                    <th align="right" style="width: 15%">复查期限:</th>
                    <td colspan="4" class="tdbgcolor">
                        <span id="dwdz">{{$comcheck[0]->againDate}}</span>
                    </td>
                </tr>
                <tr>
                    <th align="right" style="width: 15%">检查人员签名:</th>
                    <td colspan="4" class="tdbgcolor">
                        <img width="300px" height="150px" src="{{$comcheck[0]->usersignature}}">
                    </td>
                </tr>
                <tr>
                    <th align="right" style="width: 15%">被检查单位现场负责人签名:</th>
                    <td colspan="4" class="tdbgcolor">
                        <img width="300px" height="150px" src="{{$comcheck[0]->comsignature}}">
                    </td>
                </tr>
                <?php $urlArray = explode(',',$comcheck[0]->wordsUrl);
    foreach ($urlArray as $k => $v) {
        $wordsUrl[$k] = substr(substr($v,1),0,-5);
    }
    ?>
@if(!empty($comcheck[0]->wordsUrl) && isset($wordsUrl[1]))
        <tr>
            <th align="right" style="width: 15%">检查告知单:</th>
            <td colspan="4" class="tdbgcolor">
                <span id="dwdz"><a style="color: red" target="_blank" href="{{$wordsUrl[0]}}.docx">消防安全下载</a></span>
                <span id="dwdz"><a style="color: #2196f3" target="_blank" href="{{$wordsUrl[0]}}.pdf">预览</a></span>
                <span id="dwdz"><a style="color: red" target="_blank" href="{{$wordsUrl[1]}}.docx">生产安全下载</a></span>
                <span id="dwdz"><a style="color: #2196f3" target="_blank" href="{{$wordsUrl[1]}}.pdf">预览</a></span>
            </td>
        </tr>
        <tr>
            <th align="right" style="width: 15%">检查记录表:</th>
            <td colspan="4" class="tdbgcolor">
                <span id="dwdz"><a style="color: red" target="_blank" href="{{$wordsUrl[2]}}.docx">消防安全下载</a></span>
                <span id="dwdz"><a style="color: #2196f3" target="_blank" href="{{$wordsUrl[2]}}.pdf">预览</a></span>
                <span id="dwdz"><a style="color: red" target="_blank" href="{{$wordsUrl[3]}}.docx">生产安全下载</a></span>
                <span id="dwdz"><a style="color: #2196f3" target="_blank" href="{{$wordsUrl[3]}}.pdf">预览</a></span>

            </td>
        </tr>
        <tr>
            <th align="right" style="width: 15%">检查档案:</th>
            <td colspan="4" class="tdbgcolor">
                <span id="dwdz"><a style="color: red" target="_blank" href="{{$wordsUrl[4]}}.docx">检查档案下载</a></span>
                <span id="dwdz"><a style="color: #2196f3" target="_blank" href="{{$wordsUrl[4]}}.pdf">预览</a></span>
            </td>
        </tr>
    @endif
    @else
        <tr>
        <th align="right" style="width: 15%">分类:</th>
        <td class="tdbgcolor" style="width: 35%" colspan="3">
            <span id="EnteType">{{$categoryname}}</span>
        </td>
    </tr>
    <tr>
        <th align="right" style="width: 15%">门牌号:</th>
        <td class="tdbgcolor" style="width: 35%">
            <span id="dwmc">{{$company->comName}}</span>
        </td>
        <th align="right" style="width: 15%">身份证号:</th>
        <td class="tdbgcolor" style="width: 35%">
            <span id="dwgszch">{{$company->idcard}}</span>
        </td>

    </tr>
    <tr>
        <th align="right" style="width: 15%">户主:</th>
        <td class="tdbgcolor" style="width: 35%">
            <span id="fddbr">{{$company->leader}}</span>
        </td>
        <th align="right" style="width: 15%">电话:</th>
        <td class="tdbgcolor" style="width: 35%">
            <span id="fddbrgddh">{{$company->leaderPhone}}</span>
        </td>
    </tr>
    <tr>
        <th align="right" style="width: 15%">检查情况:</th>
        <td colspan="4" class="tdbgcolor">
            <span id="dwdz">{!! $is?'检查项均检查合格':'' !!}
            @if(!empty($negatives))
                @foreach($negatives as $ne)
                    {{$ne['content'].';'}}
                @endforeach
            @endif
            </span>
        </td>
    </tr>
    <tr>
        <th align="right" style="width: 15%">整改状态:</th>
        <td colspan="4" class="tdbgcolor">
            <span id="dwdz">{!! $again?'正常':'待整改' !!}</span>
        </td>
    </tr>
    <tr>
        <th align="right" style="width: 15%">复查期限:</th>
        <td colspan="4" class="tdbgcolor">
            <span id="dwdz">{{$comcheck[0]->againDate}}</span>
        </td>
    </tr>
    <tr>
        <th align="right" style="width: 15%">检查人员签名:</th>
        <td colspan="4" class="tdbgcolor">
            <img width="300px" height="150px" src="{{$comcheck[0]->usersignature}}">
        </td>
    </tr>
    <tr>
        <th align="right" style="width: 15%">被检查人签名:</th>
        <td colspan="4" class="tdbgcolor">
            <img width="300px" height="150px" src="{{$comcheck[0]->comsignature}}">
        </td>
    </tr>
    <?php $urlArray = explode(',',$comcheck[0]->wordsUrl);
    foreach ($urlArray as $k => $v) {
        $wordsUrl[$k] = substr(substr($v,1),0,-5);
    }
    ?>
     <tr>
            <th align="right" style="width: 15%">检查告知单:</th>
            <td colspan="4" class="tdbgcolor">
                <span id="dwdz"><a style="color: red" target="_blank" href="{{$wordsUrl[0]}}.docx">下载</a></span>
                <span id="dwdz"><a style="color: #2196f3" target="_blank" href="{{$wordsUrl[0]}}.pdf">预览</a></span>

            </td>
        </tr>
    @endif
                </tbody></table>
        </div>
    </div>
@endsection

